var app = angular.module('conversionTool',  [ 'ui.bootstrap' ]);

app.controller('taskCtrl', [ '$scope', '$http', function($scope, $http) {
	
	$scope.setProjectId=function(id){
		$scope.projectId=id;
		getOperations();
	}
	
	$scope.showUpload=false;
	
	$scope.operationList=["stop","continue"];
	
	var getOperations=function()
	{
		$http.post('/rest/project/getOperationsByProjectId',{"id":$scope.projectId}).success(function(data) {
			 
			
			$scope.operations=data;
			
		}).error(function(data) {

			console.log(data);
		});
	}

	
	$scope.setOperation=function(id){
		
		$scope.operationId=id;
		
		$scope.showUpload=true;
		//show upload or DB
		
	}

	
	
	
	$scope.save=function(){
		
		
	}
	
	

} ]);